<template>
	<view>
		<block v-for="(item,index) in lists" :key="index">
			<view class="shop-item d-inline-block" @tap="openShop(item.id)" >
				<view class="img"><image :src="item.pic" mode="widthFix" lazy-load></image></view>
				<view class="text-overflow font-26 font-w-b mar-top15">{{item.name}}</view>
				<view class="a-end mar-top15">
					<view class="font-w-b font-26 activeColor">
						<text>¥</text>
						<text>{{item.sell_price}}</text>
					</view>
					<view class="text-dec-line  black60-zt font-24 mar-left10">¥{{item.market_price}}</view>
				</view>
			</view>
		</block>
	</view>
	
</template>

<script>
	export default {
		props:{
			lists:Array,
		},
		methods:{
			//点击打开商品详情
			openShop(id){
				uni.navigateTo({
					url:'/pagesC/shop/shop?id='+id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	img{
		width: 100%;
		display: block;
	}
	image{
		width: 100%;
		display: block;
	}
	.shop-item{
		width: 220rpx;
		margin-right: 20rpx;
		&:last-child{
			margin-right: 0rpx;
		}
		.img{
			width: 100%;
		}
	}
</style>